x86/pci/xen: Disable PCI/MSI[-X] masking for XEN_HVM guests
authorThomas Gleixner <tglx@linutronix.de>
Thu, 28 Apr 2022 13:50:54 +0000 (15:50 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Fri, 29 Apr 2022 09:36:50 +0000 (10:36 +0100)
commit509fb4a38588d1f82413ed979226cdbfa59889cf
treec8c5f5f0ba85a47df964974123d757ac88c51faa
parent5b93d500094e2b23e3f359f48f67cb4ceba1bc39
x86/pci/xen: Disable PCI/MSI[-X] masking for XEN_HVM guests

Origin: https://lore.kernel.org/linux-pci/87tuaduxj5.ffs@tglx
Bug-Debian: https://bugs.debian.org/1006346

When a XEN_HVM guest uses the XEN PIRQ/Eventchannel mechanism, then
PCI/MSI[-X] masking is solely controlled by the hypervisor, but contrary to
XEN_PV guests this does not disable PCI/MSI[-X] masking in the PCI/MSI
layer.

This can lead to a situation where the PCI/MSI layer masks an MSI[-X]
interrupt and the hypervisor grants the write despite the fact that it
already requested the interrupt. As a consequence interrupt delivery on the
affected device is not happening ever.

Set pci_msi_ignore_mask to prevent that like it's done for XEN_PV guests
already.

Reported-by: Jeremi Piotrowski <jpiotrowski@linux.microsoft.com>
Reported-by: Dusty Mabe <dustymabe@redhat.com>
Reported-by: Salvatore Bonaccorso <carnil@debian.org>
Fixes: 809f9267bbab ("xen: map MSIs into pirqs")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Gbp-Pq: Topic bugfix/x86
Gbp-Pq: Name x86-pci-xen-Disable-PCI-MSI-X-masking-for-XEN_HVM-gu.patch
arch/x86/pci/xen.c